Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix StreamHandler Path #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mhabou
Copy link

@mhabou mhabou commented Jun 30, 2016

No description provided.

@mhabou
Copy link
Author

mhabou commented Jun 30, 2016

My example to call the custom log in an other extension

<?php
namespace Shockwavemk\CronSchedule\Controller\Adminhtml\Index;

class Index extends \Magento\Backend\App\Action
{
    /**
     * @var \MagePsycho\CustomLogger\Helper\Data
     */
    protected $_help;

    /**
     * Preview Newsletter template
     * @param \Magento\Framework\App\Action\Context $context
     * @return void|$this
     * @throws \RuntimeException
     */

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \MagePsycho\CustomLogger\Helper\Data $helper,
    ) {
        $this->_help          = $helper;
        parent::__construct($context);
    }

    public function execute()
    {
        $this->_help->log('test',true);
        $this->_view->loadLayout();
        $this->_view->getPage()->getConfig()->getTitle()->prepend(__('Cronjob timeline'));
        $this->_view->renderLayout();


    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant